import 'element-plus/dist/index.css'
import 'element-plus/es/components/message/style/css'
import 'element-plus/es/components/notification/style/css'

import { ElButton, ElDatePicker, ElConfigProvider, ElInput, ElRow, ElCol, ElForm, ElFormItem } from 'element-plus'
import type { App } from 'vue'

// 初始化 Element Plus
const obj = {
  ElButton,
  ElDatePicker,
  ElConfigProvider,
  ElInput,
  ElRow,
  ElCol,
  ElForm,
  ElFormItem
}
export function setupElementPlus(app: App) {
  // 注册按需组件
  for (let [key, value] of Object.entries(obj)) {
    app.component(key, value)
  }
}
